#ifndef __MONKEY_SLIDE_TREE__H__
#define __MONKEY_SLIDE_TREE__H__
#include "cocos2d.h"
#include "cocos-ext.h"
#include "Config.h"
#include "CCParallaxNodeExtras.h"
#include "Branch.h"
#include "TreeComponent.h"

USING_NS_CC;
USING_NS_CC_EXT;

class Tree : public CCSprite
{
	private:
		bool mIsChoose;
		Branch* mBranch;


	public:
		float mTopSide;
		Tree();
		inline void fSetIsChoose(bool choose) {mIsChoose = choose;}
		inline int fGetIsChoose() {return mIsChoose;}
		// Tra ve toa do X ben trai cua cay -> dung de add hoa qua + vi tri truot cua con khi
		inline float fGetLeftX(){return this->getPositionX() - this->getContentSize().width/2 - 20 ;};
		// Tra ve toa do ben phai cua cay -> dung de add hoa qua + vi tri truot cua con khi
		inline float fGetRightX(){return this->getPositionX() + this->getContentSize().width/2 + 20 ;};

		void fAddBranch();
		void fAssemblyBodyTree();
		void fAssemblyEndTree();
		
};

#endif